﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Text.RegularExpressions;

namespace Master
{
    /// <summary>
    /// Interaction logic for CtrlIpinput.xaml
    /// </summary>
    
    /**
     * @Creator: V.L. de Jager
     * @Changes made by:
     *      - A.J. Janssen
     * */
    public partial class CtrlConnected : UserControl
    {
        public CtrlConnected() { } //temporary constructor so we can use the designer to modify this control

        private SpawnPoint spawnPoint;

        public CtrlConnected(SpawnPoint spawnPoint)
        {
            InitializeComponent();
            this.spawnPoint = spawnPoint;
            hookupButtonEvents();
        }

        private void hookupButtonEvents()
        {
            btnCloseConnection.Click += closeConnection;
        }

        public void closeConnection(object sender, EventArgs args)
        {
            spawnPoint.closeConnection();
        }
    }
}
